Xceed Grid for WinForms v4.3 Documentation
Migrating to v3.5
Welcome to Xceed Grid for WinForms v4.3 > Migrating > Migrating to v3.5

Version 3.5 of Xceed Grid for WinForms features Vista-like gradient maps. In order to accomodate this new feature, certain changes to the order of the painting of the elements in the grid have been made. However, these changes could have an impact on the appearance of applications written using Xceed Grid for WinForms.

Paint order in version 3.5

The following describes the new paint order of the elements in the grid.

The methods responsible for painting can all be overridden, with the exception of the methods that handle the painting of the grid's borders and background.

In the paint order described below, it must be understood that the PaintBackground, PaintSelectedState, PaintErrorState, and PaintHotState methods all perform the following steps, in order: 1) a fill using the BackColor, 2) a paint of the GradientMap, 3) a paint of the BackgroundImage. The PaintBorders and PaintForeground methods do not perform these steps. 

Grid (methods not overridable)

1) Paint the grid borders.

2) Paint background (BackColor, GradientMap, then BackgroundImage).

Row selector pane

1) Paint the row selector pane borders.

2) Paint the row selector pane background (BackColor, GradientMap, then BackgroundImage).

3) If the row selector pane is hot, paint its hot state (BackColor, GradientMap, then BackgroundImage).

4) Paint the row selector pane foreground.

Group margins

1) Paint the group margin borders.

2) Paint the group margin background (BackColor, GradientMap, then BackgroundImage).

3) If the group margin is hot, paint its hot state (BackColor, GradientMap, then BackgroundImage).

4) Paint the group margin foreground.

Visible rows

A loop then performs the following on each visible row: 

Row selector

1) Paint the row selector borders.

2) Paint the row selector background (BackColor, GradientMap, then BackgroundImage).

3) If the row selector is hot, paint its hot state (BackColor, GradientMap, then BackgroundImage). 

4) Paint the row selector foreground.

Row

1)  Paint the row borders.

2)  Paint the row background (BackColor, GradientMap, then BackgroundImage).

A loop then performs the following on each visible cell in the row currently being painted:

1)  Paint the cell background (BackColor, GradientMap, then BackgroundImage). Note: Borders will be painted just before the foreground later on.

3) If the row is selected, paint the row selected state (BackColor, GradientMap, then BackgroundImage).

4) If the row is a cell row and is in an error state (errorDescription does not equal string.Empty, or input validation fails), paint its error state (BackColor, GradientMap, then BackgroundImage).

A loop then performs the following on each visible cell in the row currently being painted (even if the row is not in an error state):

1) If the cell is in an error state (errorDescription does not equal string.Empty, or input validation fails), paint its error state (BackColor, GradientMap, then BackgroundImage).

5) If the row is hot, paint its hot state (BackColor, GradientMap, then BackgroundImage).

A loop then performs the following for each visible cell in the row being painted (if it is hot):

1) If the cell is hot, paint its hot state (BackColor, GradientMap, then BackgroundImage).

6)  Paint the row foreground.

A loop then performs the following for each visible cell in the row currently being painted:

1)  Paint the cell borders.

2)  Paint the cell foreground.